<?php
ob_start();
session_start();
include('config.inc.php');
$cur_page = $_SESSION['cur_page'];
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=$charset\"/>";
?>
<html>
<title><?php echo $title; ?></title>
<head>
<!-- CSS -->
<style type="text/css">
#headerlogin{
	text-align:center;
	font-size:12pt;
	font-weight:bold;
	padding:20px 0px 20px 0px;
	}
#inputext input{
	margin-left:0px;
	font-size:8pt;
	width:300px;
	height:25px;
	}
#inpubut{
	padding:10px 50px 50px 0px;
	text-align:right;
}
.input {
    border: 1px solid #006;
    background: #FFFFFF;
}
#textlogin{
	text-align:left;
	padding:10px 0px 0px 45px;
}
#login {
	background: transparent url(images/login-bkg-tile.jpg) center top no-repeat;
	width:390px;
}

#login form {
	 background: transparent url(images/login-bkg-bottom.png) center bottom no-repeat;
	_background: transparent url(images/login-bkg-bottom.gif) center bottom no-repeat;
	}
</style>
<!-- Javascript -->
<script language="javascript">
function checkEnter(e){ //e is event object passed from function invocation
	var characterCode = ""; //literal character code will be stored in this variable;

	if(e && e.which){ //if which property of event object is supported (NN4)
		e = e;
		characterCode = e.which; //character code is contained in NN4's which property
	}else{
		e = event;
		characterCode = e.keyCode; //character code is contained in IE's keyCode property
	}

	if(characterCode == 13){ //if generated character code is equal to ascii 13 (if enter key)
		document.forms[0].submit(); //submit the form
		return false;
	}else{
		return true; 
	}

}
</script>
</head>
<body>
<center>
<div id='login'>
<form name="login_form" method="post" action="checkuser.php">
	<div style='padding:80px 0px 0px 0px;'><?php echo "<font color='red'>".$_GET[msg]."</font>"; ?></div>
	<div id='headerlogin'><small>กรุณาเข้าสู่ระบบเพื่อทำรายการ<br><br><font color='red'>Usernameไม่ต้องมี @ttt.co.th</font></small></div>
	<div id="textlogin"><small>Username : </small></div>
	<div id='inputext'><input name='user' type='text' id='user'></div>
	<div id="textlogin"><small>Password : </small></div>
	<div id='inputext'><input name='passwd' type='password' id='passws' onKeyPress="javascript:checkEnter(event);"></div>
	<div id="inpubut"><input class='input' type="submit" name="Submit" id="Submit" value="เข้าสู่ระบบ FCR">
	</div>
	<div></div>
</form>
</div>
</center>
</body>
</html>
